<template>
  <van-address-list
    :list="rendata"
    :switchable="false"
    @add="onadd"
    @edit="onexit"
  />
</template>

<script>
import axios from "../until/HttpAxios.js";
export default {
  data() {
    return {
      rendata: [],
    };
  },
  mounted() {
    axios.get("/api/massage").then((res) => {
      this.rendata = res.data.data;
      console.log(this.rendata);
    });
  },
  methods: {
    onadd() {
      console.log("添加");
      this.$router.push(`/about/${-1}`);
    },
    onexit({ id }) {
      console.log("修改");

      this.$router.push(`/about/${id}`);
    },
  },
};
</script>

<style>
</style>